﻿using Crawler.Core;
using Crawler.Framework;
using Microsoft.Extensions.DependencyInjection;
using System;

namespace Crawler.App.Client
{
    class Program
    {
        static void Main(string[] args)
        {
            var services = new ServiceCollection();
            var provider =services.AddCores()
            .AddModels()
            .AddFrameworkServices()
            .AddDefaultDbContext()
            .BuildServiceProvider();

            Setup(provider);//启动
        }

        static void Setup(IServiceProvider provider)
        {
            var crawlerManager = provider.GetService<CrawlerManager>();
            crawlerManager.Start();
        }


    }
}
